package net.sky.oa.test.dao.talkpark;

import java.util.Date;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

import net.sky.oa.dao.talkpark.MailBoxDao;
import net.sky.oa.model.Mail;
import net.sky.oa.model.MailBox;
import net.sky.oa.model.MailFolder;
import net.sky.oa.model.SysEmployee;
import net.sky.oa.test.BaseTestCase;

public class MailBoxDaoTestCase extends BaseTestCase {
	
	@Resource
	private MailBoxDao mailboxdao;
	
	@Test
	@Rollback(false)
	public void save(){
	SysEmployee user=new SysEmployee();
	user.setId(1L);
	Mail mail=new Mail();
	mail.setId(2L);
	MailFolder mailfolder=new MailFolder();
	mailfolder.setId(1L);
	MailBox mailbox=new MailBox();
	mailbox.setDelflag((short)0);
	mailbox.setMail(mail);
	mailbox.setMailfolder(mailfolder);
	mailbox.setNote("发送的邮件");
	mailbox.setReadflag(1);
	mailbox.setReplyFlag(0);
	mailbox.setSendTime(new Date());
	mailbox.setUser(user);
	this.mailboxdao.save(mailbox);	
	}

}
